#include <stdio.h>

int main() {
    int n, k;
    int sumUp = 0;
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= n; i++) {
        sumUp += k % i;
    }
    printf("%d", sumUp);
    return 0;
}